﻿@model AutomatedTestDataManagement.Models.TestScenario

@{
    ViewBag.Title = "Delete";
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this test scenario?</h3>
<fieldset>
    <legend>TestScenario</legend>

    <div class="display-label">
         @Html.LabelFor(model => model.ScenarioName, "Scenario Name")
    </div>
    <div class="display-field">
        @Html.LabelFor(model => model.ScenarioName)
    </div>

    <div class="display-label">
         @Html.LabelFor(model => model.ScenarioDescription, "Scenario Description")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ScenarioDescription)
    </div>

    <div class="display-label">
         @Html.LabelFor(model => model.TFSID, "Item Tracking ID")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TFSID)
    </div>
</fieldset>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
<div class="display-field">
    @Html.ValidationSummary(true)
        @if(ViewContext.ViewData.ModelState.IsValid)
        {
            <input type="submit" value="Delete" /> @Html.Encode(" | ")
        }
        else
        {
               <table>
                   <tr>
                       <th>Test Name</th>
                       <th>Test Description</th>
                       <th>Order In Scenario</th>
                       <th></th>
                   </tr>
                        @Html.EditorFor(m => m.TestScenarioTests, new { ForDelete = Model.ScenarioID })

                </table>
                <table>
                    <tr>
                        <th>
                            Suite Name
                        </th>
                        <th>
                            Suite Description
                        </th>
                        <th></th>
                    </tr>
                        @Html.EditorFor(m=> m.TestSuiteScenarios, new { RemoveScenario = Model.ScenarioID })
                </table>
        }
    @Html.Partial("_TestSuiteNav")

</div>
}
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
